
async function isHeicFile(file:File) {
  const buffer = await file.slice(0, 12).arrayBuffer();
  const header = new Uint8Array(buffer);
  const isHeic = header[4] === 0x66 && header[5] === 0x74 && header[6] === 0x79 && header[7] === 0x70 && header[8] === 0x68 && header[9] === 0x65 && header[10] === 0x69 && header[11] === 0x63;
  return isHeic;
}
export default isHeicFile